﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Crd1010m.aspx.cs" Inherits="Updms.Crd.Crd1010m" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Crd1010m] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
<tr>
	<td id="top_area" colspan="2">
		<!-- Top 시작 -->
		<ucTop:Top id="Top" runat="server"></ucTop:Top>
		<!-- Top 끝 -->	
	</td>
</tr>
<tr>
	<td id="menu_area">
		<!-- 메뉴 시작 -->
		<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
		<!-- 메뉴 끝 -->	
	</td>
	<td id="contents_area">
		<!-- 제목 시작 -->
		<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Crd1010m" runat="server"></ucTabTitle:TabTitle>
		<!-- 제목 끝 -->
		<!-- AJAX 시작 -->
		<asp:UpdatePanel ID="UpdatePanel1" runat="server">
		<Triggers>
			<asp:PostBackTrigger ControlID="ibtn_excel"/>
			<asp:PostBackTrigger ControlID="ibtn_save"/>
		</Triggers>
		<ContentTemplate>
		<!-- 버튼 시작 -->
		<div class="button_area">
			<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_delete" Text="삭제" runat="server" CssClass="ibtn ibtn_delete" OnClientClick="return chkDelete()" OnClick="ibtn_delete_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_save" Text="저장" runat="server" CssClass="ibtn ibtn_save" OnClientClick="return chkSave()" OnClick="ibtn_save_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
		</div>
		<!-- 버튼 끝 -->
		<!-- 검색 시작 -->
		<table class="table_search">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_card_nm" Text="카드" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_card_nm" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_card_num" Text="카드번호" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_card_num" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_use_yn" Text="사용여부" runat="server" /></td>
			<td class="ctl" width="22%"><asp:DropDownList id="ddl_search_use_yn" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		</table>
		<!-- 검색 끝 -->
		<!-- 디테일1 시작 -->
		<div class="sub_title_icon"><asp:Literal id="ltr_stitle_basic_info" Text="기본정보" runat="server" /></div>
		<table class="table_detail">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_card_cd" Text="카드코드" runat="server" /></td>
			<td class="ctl" width="22%"><asp:label id="lbl_card_cd" runat="server" Width="100%" Font-Bold="True"></asp:label></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_card_nm" Text="카드" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_card_nm" runat="server" Width="98%" CssClass="ib_b req"></asp:textbox></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_card_num" Text="카드번호" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_card_num" runat="server" Width="98%" CssClass="ib_b req"></asp:textbox></td>
		</tr>
		<tr>
			<td class="lbl"><asp:Literal id="ltr_cvc_num" Text="CVC" runat="server" /></td>
			<td class="ctl"><asp:textbox id="txt_cvc_num" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
			<td class="lbl"><asp:Literal id="ltr_valid_ym" Text="유효년월" runat="server" /></td>
			<td class="ctl"><asp:textbox id="txt_valid_ym" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
            <td class="lbl"><asp:Literal id="ltr_issue_co" Text="발급기관" runat="server" /></td>
			<td class="ctl"><asp:DropDownList id="ddl_issue_co" runat="server" CssClass="ddl"></asp:DropDownList></td>
		</tr>
		<tr>
			<td class="lbl"><asp:Literal id="ltr_accnt_num" Text="결제은행" runat="server" /></td>
			<td class="ctl"><asp:dropdownlist id="ddl_accnt_num" runat="server" CssClass="ddl"></asp:dropdownlist></td>
            <td class="lbl"><asp:Literal id="ltr_limit_use" Text="사용한도" runat="server" /></td>
			<td class="ctl"><asp:textbox id="txt_limit_use" runat="server" Width="98%" CssClass="ib_b_R"></asp:textbox></td>
			<td class="lbl"><asp:Literal id="ltr_limit_cash" Text="사용한도(현금)" runat="server" /></td>
			<td class="ctl"><asp:textbox id="txt_limit_cash" runat="server" Width="98%" CssClass="ib_b_R"></asp:textbox></td>
		</tr>
		<tr>
			<td class="lbl"><asp:Literal id="ltr_use_yn" Text="사용여부" runat="server" /></td>
			<td class="ctl"><asp:radiobuttonlist id="rbl_use_yn" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rbl_flow"></asp:radiobuttonlist></td>
            <td class="lbl"><asp:Literal id="ltr_attach_file1" Text="첨부파일" runat="server" /></td>
            <td class="ctl" colspan="3">
				<ul class="horizontal">
					<li style="width:180px;"><input class="ib_file" style="width:180px;" id="file_attach_file1" type="file" name="file_attach_file1" runat="server" /></li>
					<li style="padding:2px 0 0 2px;"><asp:LinkButton id="ibtn_delete_attach_file1" runat="server" Visible="False" ToolTip="첨부파일 삭제" OnClick="ibtn_delete_attach_file1_Click" OnClientClick="return chkDeleteAttachFile1()"><img src="../Common/Images/delete.png" alt="첨부파일 삭제" /></asp:LinkButton></li>
				</ul>
			</td>
		</tr>
		</table>
		<!-- 디테일1 끝 -->
		<!-- 디테일2 시작 -->
		<div class="sub_title_icon"><asp:Literal id="ltr_stitle_paymnt_dt_region" Text="결제일범위" runat="server" /></div>		
		<table class="table_detail">
		<tr>
			<td class="lbl_c" colspan="4" width="50%"><asp:Literal id="ltr_mass_installment" Text="일시불,할부" runat="server" /></td>
			<td class="lbl_c" colspan="4" width="50%"><asp:Literal id="ltr_cash_service" Text="현금서비스" runat="server" /></td>
		</tr>
		<tr>
			<td class="lbl" width="10%"><asp:Literal id="ltr_mass_st_div" Text="시작" runat="server" /></td>
			<td class="ctl" width="15%"><asp:dropdownlist id="ddl_mass_st_div" CssClass="ddl" runat="server" Width="49%"></asp:dropdownlist><b style="padding:0 0 0 1px" /><asp:dropdownlist id="ddl_mass_st_dt" CssClass="ddl" runat="server" Width="50%"></asp:dropdownlist></td>
			<td class="lbl" width="10%"><asp:Literal id="ltr_mass_ed_div" Text="종료" runat="server" /></td>
			<td class="ctl" width="15%"><asp:dropdownlist id="ddl_mass_ed_div" CssClass="ddl" runat="server" Width="49%"></asp:dropdownlist><b style="padding:0 0 0 1px" /><asp:dropdownlist id="ddl_mass_ed_dt" CssClass="ddl" runat="server" Width="50%"></asp:dropdownlist></td>
			<td class="lbl" width="10%"><asp:Literal id="ltr_cash_st_div" Text="시작" runat="server" /></td>
			<td class="ctl" width="15%"><asp:dropdownlist id="ddl_cash_st_div" CssClass="ddl" runat="server" Width="49%"></asp:dropdownlist><b style="padding:0 0 0 1px" /><asp:dropdownlist id="ddl_cash_st_dt" CssClass="ddl" runat="server" Width="50%"></asp:dropdownlist></td>
			<td class="lbl" width="10%"><asp:Literal id="ltr_cash_ed_div" Text="종료" runat="server" /></td>
			<td class="ctl" width="15%"><asp:dropdownlist id="ddl_cash_ed_div" CssClass="ddl" runat="server" Width="49%"></asp:dropdownlist><b style="padding:0 0 0 1px" /><asp:dropdownlist id="ddl_cash_ed_dt" CssClass="ddl" runat="server" Width="50%"></asp:dropdownlist></td>
		</tr>
		</table>
		<!-- 디테일2 끝 -->
		<!-- 리스트셋 시작 -->
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr>
			<td>
				<!-- 검색어 시작 -->
				<div class="div_left">Keyword : <asp:label id="lbl_search_keyword" runat="server"></asp:label></div>
				<div class="div_right"><asp:checkbox id="cb_list_all" runat="server" AutoPostBack="True" OnCheckedChanged="cb_list_all_CheckedChanged" ToolTip="Show All"></asp:checkbox></div>
				<!-- 검색어 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 리스트 시작 -->
				<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" DataKeyNames="Seq,Issue_Co,Accnt_Num,Mass_St_Div,Mass_St_Dt,Mass_Ed_Div,Mass_Ed_Dt,Cash_St_Div,Cash_St_Dt,Cash_Ed_Div,Cash_Ed_Dt,Attach_File1,Attach_File1_Size">
					<Columns>
						<asp:TemplateField HeaderText="&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;checkBoxCheck('GridView1');&quot;&gt;S&lt;/a&gt;">
							<ItemTemplate>
								<input id="cb_check" class="cb" type="checkbox" onclick="reverseRow('GridView1', 0);" runat="server" />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Width="2%" />
						</asp:TemplateField>
						<asp:BoundField HeaderText="번호" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="4%" />
						</asp:BoundField>
						<asp:BoundField HeaderText="이미지" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="6%" />
						</asp:BoundField>
						<asp:BoundField DataField="Seq" HeaderText="Seq(X)" Visible="False" />
						<asp:BoundField DataField="Card_Cd" HeaderText="카드코드" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="6%" />
						</asp:BoundField>
						<asp:TemplateField HeaderText="카드명">
							<ItemTemplate>
								<asp:LinkButton ID="lbtn_rc" runat="server" Text='<%# Bind("Card_Nm") %>'></asp:LinkButton>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Left" Width="14%" />
							<HeaderStyle CssClass="lbtn_rc" />
						</asp:TemplateField>
						<asp:BoundField DataField="Card_Num" HeaderText="카드번호" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="12%" />
						</asp:BoundField>
						<asp:BoundField DataField="Cvc_Num" HeaderText="CVC번호" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="4%" />
						</asp:BoundField>
						<asp:BoundField DataField="Valid_Ym" HeaderText="유효년월" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="6%" />
						</asp:BoundField>
						<asp:BoundField DataField="Limit_Use" HeaderText="사용한도" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Right" Width="8%" />
						</asp:BoundField>
						<asp:BoundField DataField="Limit_Cash" HeaderText="사용한도(현금)" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Right" Width="10%" />
						</asp:BoundField>
						<asp:BoundField DataField="Issue_Co" HeaderText="Issue_Co(X)" Visible="False" />
						<asp:BoundField DataField="Issue_Co_Nm" HeaderText="발급기관" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="6%" />
						</asp:BoundField>
						<asp:BoundField DataField="Accnt_Nm" HeaderText="결제은행" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="16%" />
						</asp:BoundField>
						<asp:BoundField DataField="Accnt_Num" HeaderText="Accnt_Num(X)" Visible="False" />
						<asp:BoundField DataField="Use_Yn" HeaderText="사용여부" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="6%" />
						</asp:BoundField>
						<asp:BoundField DataField="Mass_St_Div" HeaderText="Mass_St_Div(X)" Visible="False" />
						<asp:BoundField DataField="Mass_St_Dt" HeaderText="Mass_St_Dt(X)" Visible="False" />
						<asp:BoundField DataField="Mass_Ed_Div" HeaderText="Mass_Ed_Div(X)" Visible="False" />
						<asp:BoundField DataField="Mass_Ed_Dt" HeaderText="Mass_Ed_Dt(X)" Visible="False" />
						<asp:BoundField DataField="Cash_St_Div" HeaderText="Cash_St_Div(X)" Visible="False" />
						<asp:BoundField DataField="Cash_St_Dt" HeaderText="Cash_St_Dt(X)" Visible="False" />
						<asp:BoundField DataField="Cash_Ed_Div" HeaderText="Cash_Ed_Div(X)" Visible="False" />
						<asp:BoundField DataField="Cash_Ed_Dt" HeaderText="Cash_Ed_Dt(X)" Visible="False" />
					</Columns>
					<EmptyDataTemplate>
						<div id="no_data"></div>
					</EmptyDataTemplate>
				</asp:GridView>
				<!-- 리스트 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 페이징 시작 -->
				<div class="div_left">Result : <asp:label id="lbl_result_count" runat="server"></asp:label></div>
				<div class="div_right"><asp:label id="lbl_page" runat="server"></asp:label></div>
				<!-- 페이징 끝 -->
			</td>
		</tr>
		</table>			
		<!-- 리스트셋 끝 -->
		<!-- 카피라이트 시작 -->
		<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
		<!-- 카피라이트 끝 -->
		<!-- 히든값 시작 -->
		<div id="hdn_data">
			<asp:label id="lbl_pk" runat="server"></asp:label>
			<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			<asp:Label id="lbl_attach_file1" runat="server"></asp:Label>
			<asp:Label id="lbl_attach_file1_size" runat="server"></asp:Label>
			<input id="h_no" type="hidden" name="h_no" runat="server" />
		</div>
		<!-- 히든값 끝 -->
		<!-- FilteredTextBoxExtender 시작 -->
		<act:FilteredTextBoxExtender ID="fte_limit_use"
			runat="server"
			TargetControlID="txt_limit_use"
			FilterType="Custom, Numbers"
			ValidChars=",">
		</act:FilteredTextBoxExtender>
		<act:FilteredTextBoxExtender ID="fte_limit_cash"
			runat="server"
			TargetControlID="txt_limit_cash"
			FilterType="Custom, Numbers"
			ValidChars=",">
		</act:FilteredTextBoxExtender>
		<!-- FilteredTextBoxExtender 끝 -->			
		</ContentTemplate>
		</asp:UpdatePanel>
		<!-- AJAX 끝 -->
	</td>
</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//저장
	function chkSave() {
		if ($F("txt_card_nm").blank()) {
			msgBox.alert(getMsg(MSG_ERR_030), setFocus, "txt_card_nm");	//카드이름을 입력해 주세요
			return false;
		}
		if ($F("txt_card_num").blank()) {
			msgBox.alert(getMsg(MSG_ERR_031), setFocus, "txt_card_num");	//카드번호를 입력해 주세요
			return false;
		}

		var pk = $get("lbl_pk").innerHTML;
		var MSG_ID = (pk == "") ? MSG_CFM_000 : MSG_CFM_028; //저장/수정
		msgBox.confirm(getMsg(MSG_ID), doSave); //저장하시겠습니까?

		return false;
	}

	//첨부파일 삭제
	function chkDeleteAttachFile1() {
		msgBox.confirm(getMsg(MSG_CFM_006), doDeleteAttachFile1); //파일을 삭제하시겠습니까?
		return false;
	}
	
	//삭제
	function chkDelete() {
		if(!isCheckedOnGridView("GridView1", 0)) {
			msgBox.alert(getMsg(MSG_ERR_053));	//삭제할 항목을 선택하세요
			return false;
		}
		msgBox.confirm(getMsg(MSG_CFM_001), doDelete);	//삭제하시겠습니까?
		return false;
	}

</script>
</body>
</html>